<!--
 * @Author: lmk
 * @Date: 2020-11-10 11:17:42
 * @LastEditTime: 2021-12-07 14:55:54
 * @LastEditors: lmk
 * @Description: 
-->
<template>
	<view :class="currentTheme">
		<a-nabbar  :is-back="false" name="资讯"/>
		<view class="u-padding-32">
			<item-search placeholder="搜索资讯" @change="setDown" v-model="inputName"></item-search>
			</view>
			<view class="content">
				<view class="sticky-tabs  u-padding-left-32 u-padding-right-32" :style="{top:top}">
					<me-tabs v-model="indexCurrent" @tabTop="getTabTop" :height="88"  :tabs="tabs" @change="tabGetChange" activeColor="#765CFE" nameKey="tabname"></me-tabs>
				</view>
				<swiper :indicator-dots="false" :autoplay="false" :style="swiperStyle"  :duration="300" :current="tabIndex" @change="getChange">
					<swiper-item  v-for="(a,b) in tabs" :key="b" >
						<mescroll-item :tabIndex="b" :form="a" ref="mescroll"></mescroll-item>
					</swiper-item>
				</swiper>
			</view>
		</view>
		
</template>

<script>
	import MescrollItem from "./swiperItem.vue";
	import swiperList from '@/mixins/swiperList.js'
	import pageMixins from '@/pages/pageMixins.js'
	import itemSearch from '@/components/itemSearch/itemSearch.vue'

	export default {
		components: {
			MescrollItem,itemSearch
		},
		mixins:[swiperList,pageMixins],
		data() {
			return {
				tabs:[
					{tabname:'展会', list: null, num:1, y:0, curPageLen:0,type:1, hasNext:true},
					{tabname:'剧烈运动', list: null, num:1, y:0,curPageLen:0, type:0, hasNext:true},
					{tabname:'剧本评测', list: null, num:1, y:0, curPageLen:0,type:4, hasNext:true}
				],
				inputName:"",
				otherHeight:'152rpx',

			}
		},
		methods:{
			setDown(){
				const ref = this.$refs.mescroll[this.tabIndex];
				ref.form.name = this.inputName;
				ref.downCallback()
			},
		}
	}
</script>
<style lang="scss" scoped>
	@import '@/pages/pageStyle.scss';
</style>